#ifndef DATAGRAM_HEADER
#define DATAGRAM_HEADER

#include <stdlib.h>
#include <cstring>
#include "configure.hpp"

class datagram_header {
    private:
        datagram_header(){}
    public:
        datagram_header(datagram_type type);

        // use to read header in buffer
        datagram_header(char* buffer);
        datagram_type type;
        int dataLength;
        int seqNum;
        int follow;
        int rcv_window_size;

        // make header a string in buffer
        void get(char* buffer);
};

#endif // !DATAGRAM_HEADER


